﻿using SD.Infrastructure.DTOBase;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Runtime.Serialization;

namespace SlamDunk.MES.IAppService.DTOs.Outputs.ConfigurationContext
{
    /// <summary>
    /// 硬件连接数据传输对象
    /// </summary>
    [DataContract]
    public class HardwareConnectionInfo : BaseDTO
    {
        #region 终端Id —— Guid? TerminalId
        /// <summary>
        /// 终端Id
        /// </summary>
        [DataMember]
        public Guid? TerminalId { get; set; }
        #endregion

        #region 连接模式 —— HardwareConnectionMode ConnectionMode
        /// <summary>
        /// 连接模式
        /// </summary>
        [DataMember]
        public HardwareConnectionMode ConnectionMode { get; set; }
        #endregion

        #region IP地址 —— string IPAddress
        /// <summary>
        /// IP地址
        /// </summary>
        [DataMember]
        public string IPAddress { get; set; }
        #endregion

        #region 端口号 —— int? Port
        /// <summary>
        /// 端口号
        /// </summary>
        [DataMember]
        public int? Port { get; set; }
        #endregion

        #region 串口端口号 —— string ComPort
        /// <summary>
        /// 串口端口号
        /// </summary>
        [DataMember]
        public string ComPort { get; set; }
        #endregion

        #region 波特率 —— int? BaudRate
        /// <summary>
        /// 波特率
        /// </summary>	
        [DataMember]
        public int? BaudRate { get; set; }
        #endregion

        #region 停止位 —— StopBits? StopBit
        /// <summary>
        /// 停止位
        /// </summary>	
        [DataMember]
        public StopBits? StopBit { get; set; }
        #endregion

        #region 校验位 —— Parity? ParityBit
        /// <summary>
        /// 校验位
        /// </summary>	
        [DataMember]
        public Parity? ParityBit { get; set; }
        #endregion

        #region 数据位 —— int? DataBit
        /// <summary>
        /// 数据位
        /// </summary>	
        [DataMember]
        public int? DataBit { get; set; }
        #endregion

        #region 数据终端准备 —— bool? DTR
        /// <summary>
        /// 数据终端准备
        /// </summary>	
        [DataMember]
        public bool? DTR { get; set; }
        #endregion

        #region 请求发送 —— bool? RTS
        /// <summary>
        /// 请求发送
        /// </summary>	
        [DataMember]
        public bool? RTS { get; set; }
        #endregion
    }
}
